package com.ruibang.glass.material.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruibang.glass.material.entity.MaterialInventoryItem;
import com.ruibang.glass.material.mapper.MaterialInventoryItemMapper;
import com.ruibang.glass.material.service.MaterialInventoryItemService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 结存报表
 * </p>
 *
 * @author mameng
 * @since 2024-03-30
 */
@Service
public class MaterialInventoryItemImpl extends ServiceImpl<MaterialInventoryItemMapper, MaterialInventoryItem> implements MaterialInventoryItemService {

    @Override
    public void updateQualityByNumber(List<MaterialInventoryItem> inventoryItems) {
        if(CollectionUtils.isNotEmpty(inventoryItems)){
            for (MaterialInventoryItem inventoryItem : inventoryItems) {
                baseMapper.updateQualityByNumber(inventoryItem);
            }
        }

    }
}
